package com.atguigu.gulimall.cart.service;

import com.atguigu.gulimall.cart.vo.CartItemVo;
import com.atguigu.gulimall.cart.vo.CartVo;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface CartService {
    CartItemVo addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    CartVo getCartList() throws ExecutionException, InterruptedException;

    void deleteItem(Long skuId);

    List<CartItemVo> getCartOrder();

    /**
     * 修改购物车状态
     * @param skuId
     * @param check
     */
    void UpdateCartItem(Integer skuId, Integer check);

    CartItemVo getCartNum(Long skuId);

    //清空购物车
    void clearCart(String id);
}
